Skip to content

Conversation

kkckkc
Copy link

@kkckkc kkckkc commented Mar 22, 2023

Fixes #224

While #224 is closed with a workaround, that workaround does not work for me as I rely on a series of list prompts where the available choices depends on previously selected values.

This PR provides a simple fix for handling the list prompt when the choices property is a function. We pass the previous answers into bypass function, and in listTypeBypass we check if choices is a function and in that case invokes it to get the available choices as an array

I suppose this can be extended to support checkboxes as well, but that goes beyond my immediate need.

@LouisCuvelier
Copy link

Can we have a look at this @crutchcorn please ?
As an example, at the moment, we can't use Claude Code (or any automated script) to run the command via CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dynamic choices and CLI
2 participants